using HKB.Common;
using System;
using System.CodeDom.Compiler;
using System.ComponentModel;
using System.ComponentModel.Design;
using System.Data;
using System.Data.Common;
using System.Data.SqlClient;
using System.Diagnostics;
namespace HKB.Data.Dal.S_ShopBuyMoneyTableAdapters
{
	[GeneratedCode("System.Data.Design.TypedDataSetGenerator", "2.0.0.0"), DataObject(true), HelpKeyword("vs.data.TableAdapter"), Designer("Microsoft.VSDesigner.DataSource.Design.TableAdapterDesigner, Microsoft.VSDesigner, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"), DesignerCategory("code"), ToolboxItem(true)]
	public class HlShop_BuyMoneyTableAdapter : Component
	{
		private SqlDataAdapter _adapter;
		private SqlConnection _connection;
		private SqlCommand[] _commandCollection;
		private bool _clearBeforeFill;
		[System.Diagnostics.DebuggerNonUserCode]
		private SqlDataAdapter Adapter
		{
			get
			{
				if (this._adapter == null)
				{
					this.InitAdapter();
				}
				return this._adapter;
			}
		}
		[System.Diagnostics.DebuggerNonUserCode]
		internal SqlConnection Connection
		{
			get
			{
				if (this._connection == null)
				{
					this.InitConnection();
				}
				return this._connection;
			}
			set
			{
				this._connection = value;
				if (this.Adapter.InsertCommand != null)
				{
					this.Adapter.InsertCommand.Connection = value;
				}
				if (this.Adapter.DeleteCommand != null)
				{
					this.Adapter.DeleteCommand.Connection = value;
				}
				if (this.Adapter.UpdateCommand != null)
				{
					this.Adapter.UpdateCommand.Connection = value;
				}
				for (int i = 0; i < this.CommandCollection.Length; i++)
				{
					if (this.CommandCollection[i] != null)
					{
						this.CommandCollection[i].Connection = value;
					}
				}
			}
		}
		[System.Diagnostics.DebuggerNonUserCode]
		protected SqlCommand[] CommandCollection
		{
			get
			{
				if (this._commandCollection == null)
				{
					this.InitCommandCollection();
				}
				return this._commandCollection;
			}
		}
		[System.Diagnostics.DebuggerNonUserCode]
		public bool ClearBeforeFill
		{
			get
			{
				return this._clearBeforeFill;
			}
			set
			{
				this._clearBeforeFill = value;
			}
		}
		[System.Diagnostics.DebuggerNonUserCode]
		public HlShop_BuyMoneyTableAdapter()
		{
			this.ClearBeforeFill = true;
		}
		[System.Diagnostics.DebuggerNonUserCode]
		private void InitAdapter()
		{
			this._adapter = new SqlDataAdapter();
			DataTableMapping dataTableMapping = new DataTableMapping();
			dataTableMapping.SourceTable = "Table";
			dataTableMapping.DataSetTable = "HlShop_BuyMoney";
			dataTableMapping.ColumnMappings.Add("id", "id");
			dataTableMapping.ColumnMappings.Add("ordernum", "ordernum");
			dataTableMapping.ColumnMappings.Add("status", "status");
			dataTableMapping.ColumnMappings.Add("createdate", "createdate");
			dataTableMapping.ColumnMappings.Add("updatedate", "updatedate");
			dataTableMapping.ColumnMappings.Add("paytype", "paytype");
			dataTableMapping.ColumnMappings.Add("userid", "userid");
			dataTableMapping.ColumnMappings.Add("money", "money");
			dataTableMapping.ColumnMappings.Add("remark", "remark");
			dataTableMapping.ColumnMappings.Add("originalityMoney", "originalityMoney");
			dataTableMapping.ColumnMappings.Add("PayedMoney", "PayedMoney");
			this._adapter.TableMappings.Add(dataTableMapping);
			this._adapter.DeleteCommand = new SqlCommand();
			this._adapter.DeleteCommand.Connection = this.Connection;
			this._adapter.DeleteCommand.CommandText = "DELETE FROM [HlShop_BuyMoney] WHERE (([id] = @Original_id))";
			this._adapter.DeleteCommand.CommandType = CommandType.Text;
			this._adapter.DeleteCommand.Parameters.Add(new SqlParameter("@Original_id", SqlDbType.Int, 0, ParameterDirection.Input, 0, 0, "id", DataRowVersion.Original, false, null, "", "", ""));
			this._adapter.InsertCommand = new SqlCommand();
			this._adapter.InsertCommand.Connection = this.Connection;
			this._adapter.InsertCommand.CommandText = "INSERT INTO [HlShop_BuyMoney] ([ordernum], [status], [createdate], [updatedate], [paytype], [userid], [originalityMoney], [PayedMoney], [money], [remark]) VALUES (@ordernum, @status, @createdate, @updatedate, @paytype, @userid, @originalityMoney, @PayedMoney, @money, @remark);\r\nSELECT id, ordernum, status, createdate, updatedate, paytype, userid, originalityMoney, PayedMoney, money, remark FROM HlShop_BuyMoney WHERE (id = SCOPE_IDENTITY())";
			this._adapter.InsertCommand.CommandType = CommandType.Text;
			this._adapter.InsertCommand.Parameters.Add(new SqlParameter("@ordernum", SqlDbType.VarChar, 0, ParameterDirection.Input, 0, 0, "ordernum", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.InsertCommand.Parameters.Add(new SqlParameter("@status", SqlDbType.Int, 0, ParameterDirection.Input, 0, 0, "status", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.InsertCommand.Parameters.Add(new SqlParameter("@createdate", SqlDbType.DateTime, 0, ParameterDirection.Input, 0, 0, "createdate", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.InsertCommand.Parameters.Add(new SqlParameter("@updatedate", SqlDbType.DateTime, 0, ParameterDirection.Input, 0, 0, "updatedate", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.InsertCommand.Parameters.Add(new SqlParameter("@paytype", SqlDbType.Int, 0, ParameterDirection.Input, 0, 0, "paytype", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.InsertCommand.Parameters.Add(new SqlParameter("@userid", SqlDbType.Int, 0, ParameterDirection.Input, 0, 0, "userid", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.InsertCommand.Parameters.Add(new SqlParameter("@originalityMoney", SqlDbType.Decimal, 0, ParameterDirection.Input, 18, 0, "originalityMoney", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.InsertCommand.Parameters.Add(new SqlParameter("@PayedMoney", SqlDbType.Decimal, 0, ParameterDirection.Input, 18, 2, "PayedMoney", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.InsertCommand.Parameters.Add(new SqlParameter("@money", SqlDbType.Decimal, 0, ParameterDirection.Input, 18, 2, "money", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.InsertCommand.Parameters.Add(new SqlParameter("@remark", SqlDbType.Text, 0, ParameterDirection.Input, 0, 0, "remark", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.UpdateCommand = new SqlCommand();
			this._adapter.UpdateCommand.Connection = this.Connection;
			this._adapter.UpdateCommand.CommandText = "UPDATE [HlShop_BuyMoney] SET [ordernum] = @ordernum, [status] = @status, [createdate] = @createdate, [updatedate] = @updatedate, [paytype] = @paytype, [userid] = @userid, [originalityMoney] = @originalityMoney, [PayedMoney] = @PayedMoney, [money] = @money, [remark] = @remark WHERE (([id] = @Original_id));\r\nSELECT id, ordernum, status, createdate, updatedate, paytype, userid, originalityMoney, PayedMoney, money, remark FROM HlShop_BuyMoney WHERE (id = @id)";
			this._adapter.UpdateCommand.CommandType = CommandType.Text;
			this._adapter.UpdateCommand.Parameters.Add(new SqlParameter("@ordernum", SqlDbType.VarChar, 0, ParameterDirection.Input, 0, 0, "ordernum", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.UpdateCommand.Parameters.Add(new SqlParameter("@status", SqlDbType.Int, 0, ParameterDirection.Input, 0, 0, "status", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.UpdateCommand.Parameters.Add(new SqlParameter("@createdate", SqlDbType.DateTime, 0, ParameterDirection.Input, 0, 0, "createdate", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.UpdateCommand.Parameters.Add(new SqlParameter("@updatedate", SqlDbType.DateTime, 0, ParameterDirection.Input, 0, 0, "updatedate", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.UpdateCommand.Parameters.Add(new SqlParameter("@paytype", SqlDbType.Int, 0, ParameterDirection.Input, 0, 0, "paytype", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.UpdateCommand.Parameters.Add(new SqlParameter("@userid", SqlDbType.Int, 0, ParameterDirection.Input, 0, 0, "userid", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.UpdateCommand.Parameters.Add(new SqlParameter("@originalityMoney", SqlDbType.Decimal, 0, ParameterDirection.Input, 18, 0, "originalityMoney", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.UpdateCommand.Parameters.Add(new SqlParameter("@PayedMoney", SqlDbType.Decimal, 0, ParameterDirection.Input, 18, 2, "PayedMoney", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.UpdateCommand.Parameters.Add(new SqlParameter("@money", SqlDbType.Decimal, 0, ParameterDirection.Input, 18, 2, "money", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.UpdateCommand.Parameters.Add(new SqlParameter("@remark", SqlDbType.Text, 0, ParameterDirection.Input, 0, 0, "remark", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.UpdateCommand.Parameters.Add(new SqlParameter("@Original_id", SqlDbType.Int, 0, ParameterDirection.Input, 0, 0, "id", DataRowVersion.Original, false, null, "", "", ""));
			this._adapter.UpdateCommand.Parameters.Add(new SqlParameter("@id", SqlDbType.Int, 4, ParameterDirection.Input, 0, 0, "id", DataRowVersion.Current, false, null, "", "", ""));
		}
		[System.Diagnostics.DebuggerNonUserCode]
		private void InitConnection()
		{
			this._connection = new SqlConnection();
			this._connection.ConnectionString = Conn.CurrenConnectionStrings;
		}
		[System.Diagnostics.DebuggerNonUserCode]
		private void InitCommandCollection()
		{
			this._commandCollection = new SqlCommand[7];
			this._commandCollection[0] = new SqlCommand();
			this._commandCollection[0].Connection = this.Connection;
			this._commandCollection[0].CommandText = "SELECT HlShop_BuyMoney.*\r\nFROM HlShop_BuyMoney";
			this._commandCollection[0].CommandType = CommandType.Text;
			this._commandCollection[1] = new SqlCommand();
			this._commandCollection[1].Connection = this.Connection;
			this._commandCollection[1].CommandText = "pr_DeleteBuyMoney";
			this._commandCollection[1].CommandType = CommandType.StoredProcedure;
			this._commandCollection[1].Parameters.Add(new SqlParameter("@RETURN_VALUE", SqlDbType.Int, 4, ParameterDirection.ReturnValue, 10, 0, null, DataRowVersion.Current, false, null, "", "", ""));
			this._commandCollection[1].Parameters.Add(new SqlParameter("@IDArray", SqlDbType.VarChar, 2000, ParameterDirection.Input, 0, 0, null, DataRowVersion.Current, false, null, "", "", ""));
			this._commandCollection[2] = new SqlCommand();
			this._commandCollection[2].Connection = this.Connection;
			this._commandCollection[2].CommandText = "SELECT PayedMoney, createdate, id, money, ordernum, originalityMoney, paytype, remark, status, updatedate, userid FROM HlShop_BuyMoney WHERE (id = @id)";
			this._commandCollection[2].CommandType = CommandType.Text;
			this._commandCollection[2].Parameters.Add(new SqlParameter("@id", SqlDbType.Int, 4, ParameterDirection.Input, 0, 0, "id", DataRowVersion.Current, false, null, "", "", ""));
			this._commandCollection[3] = new SqlCommand();
			this._commandCollection[3].Connection = this.Connection;
			this._commandCollection[3].CommandText = "pr_getbuymoneybyordernum";
			this._commandCollection[3].CommandType = CommandType.StoredProcedure;
			this._commandCollection[3].Parameters.Add(new SqlParameter("@RETURN_VALUE", SqlDbType.Int, 4, ParameterDirection.ReturnValue, 10, 0, null, DataRowVersion.Current, false, null, "", "", ""));
			this._commandCollection[3].Parameters.Add(new SqlParameter("@STRSQL", SqlDbType.VarChar, 1000, ParameterDirection.Input, 0, 0, null, DataRowVersion.Current, false, null, "", "", ""));
			this._commandCollection[4] = new SqlCommand();
			this._commandCollection[4].Connection = this.Connection;
			this._commandCollection[4].CommandText = "pr_GetBuyMoeyList";
			this._commandCollection[4].CommandType = CommandType.StoredProcedure;
			this._commandCollection[4].Parameters.Add(new SqlParameter("@RETURN_VALUE", SqlDbType.Int, 4, ParameterDirection.ReturnValue, 10, 0, null, DataRowVersion.Current, false, null, "", "", ""));
			this._commandCollection[4].Parameters.Add(new SqlParameter("@strSel", SqlDbType.VarChar, 2000, ParameterDirection.Input, 0, 0, null, DataRowVersion.Current, false, null, "", "", ""));
			this._commandCollection[5] = new SqlCommand();
			this._commandCollection[5].Connection = this.Connection;
			this._commandCollection[5].CommandText = "Pr_PayBuyMoney";
			this._commandCollection[5].CommandType = CommandType.StoredProcedure;
			this._commandCollection[5].Parameters.Add(new SqlParameter("@RETURN_VALUE", SqlDbType.Int, 4, ParameterDirection.ReturnValue, 10, 0, null, DataRowVersion.Current, false, null, "", "", ""));
			this._commandCollection[5].Parameters.Add(new SqlParameter("@PayMoney", SqlDbType.Decimal, 9, ParameterDirection.Input, 18, 2, null, DataRowVersion.Current, false, null, "", "", ""));
			this._commandCollection[5].Parameters.Add(new SqlParameter("@id", SqlDbType.Int, 4, ParameterDirection.Input, 10, 0, null, DataRowVersion.Current, false, null, "", "", ""));
			this._commandCollection[6] = new SqlCommand();
			this._commandCollection[6].Connection = this.Connection;
			this._commandCollection[6].CommandText = "pr_updateBuyMoneystatus";
			this._commandCollection[6].CommandType = CommandType.StoredProcedure;
			this._commandCollection[6].Parameters.Add(new SqlParameter("@RETURN_VALUE", SqlDbType.Int, 4, ParameterDirection.ReturnValue, 10, 0, null, DataRowVersion.Current, false, null, "", "", ""));
			this._commandCollection[6].Parameters.Add(new SqlParameter("@status", SqlDbType.Int, 4, ParameterDirection.Input, 10, 0, null, DataRowVersion.Current, false, null, "", "", ""));
			this._commandCollection[6].Parameters.Add(new SqlParameter("@IDArray", SqlDbType.VarChar, 2000, ParameterDirection.Input, 0, 0, null, DataRowVersion.Current, false, null, "", "", ""));
		}
		[DataObjectMethod(DataObjectMethodType.Select, true), HelpKeyword("vs.data.TableAdapter"), System.Diagnostics.DebuggerNonUserCode]
		public virtual S_ShopBuyMoney.HlShop_BuyMoneyDataTable GetAllBuyMoney()
		{
			this.Adapter.SelectCommand = this.CommandCollection[0];
			S_ShopBuyMoney.HlShop_BuyMoneyDataTable hlShop_BuyMoneyDataTable = new S_ShopBuyMoney.HlShop_BuyMoneyDataTable();
			this.Adapter.Fill(hlShop_BuyMoneyDataTable);
			return hlShop_BuyMoneyDataTable;
		}
		[DataObjectMethod(DataObjectMethodType.Select, false), HelpKeyword("vs.data.TableAdapter"), System.Diagnostics.DebuggerNonUserCode]
		public virtual S_ShopBuyMoney.HlShop_BuyMoneyDataTable GetBuyMoneyByID(int id)
		{
			this.Adapter.SelectCommand = this.CommandCollection[2];
			this.Adapter.SelectCommand.Parameters[0].Value = id;
			S_ShopBuyMoney.HlShop_BuyMoneyDataTable hlShop_BuyMoneyDataTable = new S_ShopBuyMoney.HlShop_BuyMoneyDataTable();
			this.Adapter.Fill(hlShop_BuyMoneyDataTable);
			return hlShop_BuyMoneyDataTable;
		}
		[DataObjectMethod(DataObjectMethodType.Select, false), HelpKeyword("vs.data.TableAdapter"), System.Diagnostics.DebuggerNonUserCode]
		public virtual S_ShopBuyMoney.HlShop_BuyMoneyDataTable GetBuyMoneyByOrdernum(string STRSQL)
		{
			this.Adapter.SelectCommand = this.CommandCollection[3];
			if (STRSQL == null)
			{
				this.Adapter.SelectCommand.Parameters[1].Value = System.DBNull.Value;
			}
			else
			{
				this.Adapter.SelectCommand.Parameters[1].Value = STRSQL;
			}
			S_ShopBuyMoney.HlShop_BuyMoneyDataTable hlShop_BuyMoneyDataTable = new S_ShopBuyMoney.HlShop_BuyMoneyDataTable();
			this.Adapter.Fill(hlShop_BuyMoneyDataTable);
			return hlShop_BuyMoneyDataTable;
		}
		[DataObjectMethod(DataObjectMethodType.Select, false), HelpKeyword("vs.data.TableAdapter"), System.Diagnostics.DebuggerNonUserCode]
		public virtual S_ShopBuyMoney.HlShop_BuyMoneyDataTable GetBuyMoneyList(string strSel)
		{
			this.Adapter.SelectCommand = this.CommandCollection[4];
			if (strSel == null)
			{
				this.Adapter.SelectCommand.Parameters[1].Value = System.DBNull.Value;
			}
			else
			{
				this.Adapter.SelectCommand.Parameters[1].Value = strSel;
			}
			S_ShopBuyMoney.HlShop_BuyMoneyDataTable hlShop_BuyMoneyDataTable = new S_ShopBuyMoney.HlShop_BuyMoneyDataTable();
			this.Adapter.Fill(hlShop_BuyMoneyDataTable);
			return hlShop_BuyMoneyDataTable;
		}
		[HelpKeyword("vs.data.TableAdapter"), System.Diagnostics.DebuggerNonUserCode]
		public virtual int Update(S_ShopBuyMoney.HlShop_BuyMoneyDataTable dataTable)
		{
			return this.Adapter.Update(dataTable);
		}
		[HelpKeyword("vs.data.TableAdapter"), System.Diagnostics.DebuggerNonUserCode]
		public virtual int Update(S_ShopBuyMoney dataSet)
		{
			return this.Adapter.Update(dataSet, "HlShop_BuyMoney");
		}
		[HelpKeyword("vs.data.TableAdapter"), System.Diagnostics.DebuggerNonUserCode]
		public virtual int Update(DataRow dataRow)
		{
			return this.Adapter.Update(new DataRow[]
			{
				dataRow
			});
		}
		[HelpKeyword("vs.data.TableAdapter"), System.Diagnostics.DebuggerNonUserCode]
		public virtual int Update(DataRow[] dataRows)
		{
			return this.Adapter.Update(dataRows);
		}
		[DataObjectMethod(DataObjectMethodType.Delete, true), HelpKeyword("vs.data.TableAdapter"), System.Diagnostics.DebuggerNonUserCode]
		public virtual int Delete(int Original_id)
		{
			this.Adapter.DeleteCommand.Parameters[0].Value = Original_id;
			ConnectionState state = this.Adapter.DeleteCommand.Connection.State;
			if ((this.Adapter.DeleteCommand.Connection.State & ConnectionState.Open) != ConnectionState.Open)
			{
				this.Adapter.DeleteCommand.Connection.Open();
			}
			int result;
			try
			{
				int num = this.Adapter.DeleteCommand.ExecuteNonQuery();
				result = num;
			}
			finally
			{
				if (state == ConnectionState.Closed)
				{
					this.Adapter.DeleteCommand.Connection.Close();
				}
			}
			return result;
		}
		[DataObjectMethod(DataObjectMethodType.Insert, true), HelpKeyword("vs.data.TableAdapter"), System.Diagnostics.DebuggerNonUserCode]
		public virtual int Insert(string ordernum, int? status, System.DateTime? createdate, System.DateTime? updatedate, int? paytype, int? userid, decimal? originalityMoney, decimal? PayedMoney, decimal? money, string remark)
		{
			if (ordernum == null)
			{
				this.Adapter.InsertCommand.Parameters[0].Value = System.DBNull.Value;
			}
			else
			{
				this.Adapter.InsertCommand.Parameters[0].Value = ordernum;
			}
			if (status.HasValue)
			{
				this.Adapter.InsertCommand.Parameters[1].Value = status.Value;
			}
			else
			{
				this.Adapter.InsertCommand.Parameters[1].Value = System.DBNull.Value;
			}
			if (createdate.HasValue)
			{
				this.Adapter.InsertCommand.Parameters[2].Value = createdate.Value;
			}
			else
			{
				this.Adapter.InsertCommand.Parameters[2].Value = System.DBNull.Value;
			}
			if (updatedate.HasValue)
			{
				this.Adapter.InsertCommand.Parameters[3].Value = updatedate.Value;
			}
			else
			{
				this.Adapter.InsertCommand.Parameters[3].Value = System.DBNull.Value;
			}
			if (paytype.HasValue)
			{
				this.Adapter.InsertCommand.Parameters[4].Value = paytype.Value;
			}
			else
			{
				this.Adapter.InsertCommand.Parameters[4].Value = System.DBNull.Value;
			}
			if (userid.HasValue)
			{
				this.Adapter.InsertCommand.Parameters[5].Value = userid.Value;
			}
			else
			{
				this.Adapter.InsertCommand.Parameters[5].Value = System.DBNull.Value;
			}
			if (originalityMoney.HasValue)
			{
				this.Adapter.InsertCommand.Parameters[6].Value = originalityMoney.Value;
			}
			else
			{
				this.Adapter.InsertCommand.Parameters[6].Value = System.DBNull.Value;
			}
			if (PayedMoney.HasValue)
			{
				this.Adapter.InsertCommand.Parameters[7].Value = PayedMoney.Value;
			}
			else
			{
				this.Adapter.InsertCommand.Parameters[7].Value = System.DBNull.Value;
			}
			if (money.HasValue)
			{
				this.Adapter.InsertCommand.Parameters[8].Value = money.Value;
			}
			else
			{
				this.Adapter.InsertCommand.Parameters[8].Value = System.DBNull.Value;
			}
			if (remark == null)
			{
				this.Adapter.InsertCommand.Parameters[9].Value = System.DBNull.Value;
			}
			else
			{
				this.Adapter.InsertCommand.Parameters[9].Value = remark;
			}
			ConnectionState state = this.Adapter.InsertCommand.Connection.State;
			if ((this.Adapter.InsertCommand.Connection.State & ConnectionState.Open) != ConnectionState.Open)
			{
				this.Adapter.InsertCommand.Connection.Open();
			}
			int result;
			try
			{
				int num = this.Adapter.InsertCommand.ExecuteNonQuery();
				result = num;
			}
			finally
			{
				if (state == ConnectionState.Closed)
				{
					this.Adapter.InsertCommand.Connection.Close();
				}
			}
			return result;
		}
		[DataObjectMethod(DataObjectMethodType.Update, true), HelpKeyword("vs.data.TableAdapter"), System.Diagnostics.DebuggerNonUserCode]
		public virtual int Update(string ordernum, int? status, System.DateTime? createdate, System.DateTime? updatedate, int? paytype, int? userid, decimal? originalityMoney, decimal? PayedMoney, decimal? money, string remark, int Original_id, int id)
		{
			if (ordernum == null)
			{
				this.Adapter.UpdateCommand.Parameters[0].Value = System.DBNull.Value;
			}
			else
			{
				this.Adapter.UpdateCommand.Parameters[0].Value = ordernum;
			}
			if (status.HasValue)
			{
				this.Adapter.UpdateCommand.Parameters[1].Value = status.Value;
			}
			else
			{
				this.Adapter.UpdateCommand.Parameters[1].Value = System.DBNull.Value;
			}
			if (createdate.HasValue)
			{
				this.Adapter.UpdateCommand.Parameters[2].Value = createdate.Value;
			}
			else
			{
				this.Adapter.UpdateCommand.Parameters[2].Value = System.DBNull.Value;
			}
			if (updatedate.HasValue)
			{
				this.Adapter.UpdateCommand.Parameters[3].Value = updatedate.Value;
			}
			else
			{
				this.Adapter.UpdateCommand.Parameters[3].Value = System.DBNull.Value;
			}
			if (paytype.HasValue)
			{
				this.Adapter.UpdateCommand.Parameters[4].Value = paytype.Value;
			}
			else
			{
				this.Adapter.UpdateCommand.Parameters[4].Value = System.DBNull.Value;
			}
			if (userid.HasValue)
			{
				this.Adapter.UpdateCommand.Parameters[5].Value = userid.Value;
			}
			else
			{
				this.Adapter.UpdateCommand.Parameters[5].Value = System.DBNull.Value;
			}
			if (originalityMoney.HasValue)
			{
				this.Adapter.UpdateCommand.Parameters[6].Value = originalityMoney.Value;
			}
			else
			{
				this.Adapter.UpdateCommand.Parameters[6].Value = System.DBNull.Value;
			}
			if (PayedMoney.HasValue)
			{
				this.Adapter.UpdateCommand.Parameters[7].Value = PayedMoney.Value;
			}
			else
			{
				this.Adapter.UpdateCommand.Parameters[7].Value = System.DBNull.Value;
			}
			if (money.HasValue)
			{
				this.Adapter.UpdateCommand.Parameters[8].Value = money.Value;
			}
			else
			{
				this.Adapter.UpdateCommand.Parameters[8].Value = System.DBNull.Value;
			}
			if (remark == null)
			{
				this.Adapter.UpdateCommand.Parameters[9].Value = System.DBNull.Value;
			}
			else
			{
				this.Adapter.UpdateCommand.Parameters[9].Value = remark;
			}
			this.Adapter.UpdateCommand.Parameters[10].Value = Original_id;
			this.Adapter.UpdateCommand.Parameters[11].Value = id;
			ConnectionState state = this.Adapter.UpdateCommand.Connection.State;
			if ((this.Adapter.UpdateCommand.Connection.State & ConnectionState.Open) != ConnectionState.Open)
			{
				this.Adapter.UpdateCommand.Connection.Open();
			}
			int result;
			try
			{
				int num = this.Adapter.UpdateCommand.ExecuteNonQuery();
				result = num;
			}
			finally
			{
				if (state == ConnectionState.Closed)
				{
					this.Adapter.UpdateCommand.Connection.Close();
				}
			}
			return result;
		}
		[HelpKeyword("vs.data.TableAdapter"), System.Diagnostics.DebuggerNonUserCode]
		public virtual int DeleteBuyMoney(string IDArray)
		{
			SqlCommand sqlCommand = this.CommandCollection[1];
			if (IDArray == null)
			{
				sqlCommand.Parameters[1].Value = System.DBNull.Value;
			}
			else
			{
				sqlCommand.Parameters[1].Value = IDArray;
			}
			ConnectionState state = sqlCommand.Connection.State;
			if ((sqlCommand.Connection.State & ConnectionState.Open) != ConnectionState.Open)
			{
				sqlCommand.Connection.Open();
			}
			int result;
			try
			{
				result = sqlCommand.ExecuteNonQuery();
			}
			finally
			{
				if (state == ConnectionState.Closed)
				{
					sqlCommand.Connection.Close();
				}
			}
			return result;
		}
		[HelpKeyword("vs.data.TableAdapter"), System.Diagnostics.DebuggerNonUserCode]
		public virtual int PayBuyMoney(decimal? PayMoney, int? id)
		{
			SqlCommand sqlCommand = this.CommandCollection[5];
			if (PayMoney.HasValue)
			{
				sqlCommand.Parameters[1].Value = PayMoney.Value;
			}
			else
			{
				sqlCommand.Parameters[1].Value = System.DBNull.Value;
			}
			if (id.HasValue)
			{
				sqlCommand.Parameters[2].Value = id.Value;
			}
			else
			{
				sqlCommand.Parameters[2].Value = System.DBNull.Value;
			}
			ConnectionState state = sqlCommand.Connection.State;
			if ((sqlCommand.Connection.State & ConnectionState.Open) != ConnectionState.Open)
			{
				sqlCommand.Connection.Open();
			}
			int result;
			try
			{
				result = sqlCommand.ExecuteNonQuery();
			}
			finally
			{
				if (state == ConnectionState.Closed)
				{
					sqlCommand.Connection.Close();
				}
			}
			return result;
		}
		[HelpKeyword("vs.data.TableAdapter"), System.Diagnostics.DebuggerNonUserCode]
		public virtual int UpdateStatus(int? status, string IDArray)
		{
			SqlCommand sqlCommand = this.CommandCollection[6];
			if (status.HasValue)
			{
				sqlCommand.Parameters[1].Value = status.Value;
			}
			else
			{
				sqlCommand.Parameters[1].Value = System.DBNull.Value;
			}
			if (IDArray == null)
			{
				sqlCommand.Parameters[2].Value = System.DBNull.Value;
			}
			else
			{
				sqlCommand.Parameters[2].Value = IDArray;
			}
			ConnectionState state = sqlCommand.Connection.State;
			if ((sqlCommand.Connection.State & ConnectionState.Open) != ConnectionState.Open)
			{
				sqlCommand.Connection.Open();
			}
			int result;
			try
			{
				result = sqlCommand.ExecuteNonQuery();
			}
			finally
			{
				if (state == ConnectionState.Closed)
				{
					sqlCommand.Connection.Close();
				}
			}
			return result;
		}
	}
}
